console.log("do dusku");

function getQueryString(name) {
    let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
    let r = window.location.search.substr(1).match(reg);
    if (r != null) {
        return r[2];
    };
    return 0;
}

$(document).ready(function() {




    setTimeout(() => {

        var desc = $(".brand-text.content-height").text().trim();
        var img = $(".brand-header-logo_img").find("img").attr("src").trim();
        var title = $(".logo-left_info_title").text().trim();

        var brand_id = getQueryString("brandId");
        var data = {};
        data.title = title;
        data.img = img;
        data.desc = desc;
        data.brand_id = brand_id;


        var type = "du_brand_info";
        chrome.runtime.sendMessage({ data: {type,data }, close: false })
        console.log(data);

    }, 5000);




})